/******************************************************************************/
/* File: tcpTrafficServer.h                                                   */
/******************************************************************************/

#ifndef TCPTRAFFICSERVER_H
#define TCPTRAFFICSERVER_H

#include "thread.h"
#include "message.h"
#include "dataStore.h"
#include "flowConfig.h"
#include "socketClass.h"
#include "messageQueue.h"
#include "tcpTrafficRecver.h"

class TCPTrafficServer : public Thread, public TCPServerSocket {

public:
    TCPTrafficServer(TrafficServerSetting *pSet, MessageQueue *pMQ);
    ~TCPTrafficServer();
    
    void CloseListenSocket();
    void ListenServer();
    void UploadRegisterInfo();
    void UploadUnregisterInfo();
    
    void ExitCleanUp();
    virtual void Run();
    
protected:
    IPAddress cListenIP;
    int iListenPort;
    int iBackLog;
    bool bUseIPv6;
    
    MessageQueue *pMsgQueue;
};

#endif

/******************************************************************************/
/* End File: tcpTrafficServer.h                                               */
/******************************************************************************/